-
Notifications
You must be signed in to change notification settings - Fork 9.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix ts with no trailing zeros #18108
fix ts with no trailing zeros #18108
Conversation
Please add a unit test. |
edbf15a
to
1a99fc9
Compare
Done. Before
After
|
1a99fc9
to
a31123f
Compare
Signed-off-by: Chao Chen <[email protected]>
a31123f
to
7211d9f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - Retaining precision for ease of formatting/sorting/viewing makes sense. Thanks for adding a unit test @chaochn47
fractionSecondsPrecision = 6 // MicroSeconds | ||
) | ||
|
||
func TestEncodeTimePrecisionToMicroSeconds(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On second thought, it might be a better idea to expand e2e logging tests in ./tests/e2e/logging_test.go.
Good enough for know, we can merge and follow up.
/cherrypick release-3.5 |
@jmhbnz: new pull request created: #18288 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.
2024-06-02T01:49:05.536Z
should be2024-06-02T01:49:05.536000Z
, so precision won't be dropped and it's easier to use string compare when sorting the timestamp. For example2024-06-02T01:49:05.536Z
should be bigger than2024-06-02T01:49:05.535123Z
but the former appears first when sorting the strings.https://pkg.go.dev/time
xref: